function tabview_aux(TabViewId, CurrentId)
{
    var TabView = document.getElementById(TabViewId);
    var Tab = TabView.firstChild;
    var i = 0;
    var j = 0;
    while (true)
    {
        if (Tab.tagName == "A")
        {
            i++;
            Tab.href = "javascript:fp_tab_switch('" + TabViewId + "', " + i + ");";
            Tab.className = (i == CurrentId) ? "Current" : "";
            Tab.blur()
        }
        Tab = Tab.nextSibling;
        if (Tab == null) {
            Tab = document.getElementById(TabViewId + "_" + j);
            j++
        }
        if (Tab == null) {
            break
        }
    }
    var Pages = document.getElementById(TabViewId + "_Pages");
    var Page = Pages.firstChild;
    var i = 0;
    do {
        if (Page.className == 'Page') {
            i++;
            Page.style.display = (i == CurrentId) ? '' : 'none'
        }
    }
    while (Page = Page.nextSibling) {}
}
function fp_tab_switch(TabViewId, id)
{
    tabview_aux(TabViewId, id)
}
function tabview_initialize(TabViewId)
{
    tabview_aux(TabViewId, 1)
}